package com.wxy.zhuzhouactivity;

import com.ak.zhuzhou.R;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;

public class ActivityFragmentAdapter extends BaseAdapter{

	private LayoutInflater inflater;

	public ActivityFragmentAdapter(LayoutInflater inflater) {
		this.inflater = inflater;
	}

	class ViewHolder {
		TextView title;
		ImageView image;
		TextView address;
		TextView endLine;
		TextView startLine;
		TextView peoples;

	}

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return 10;
	}

	@Override
	public Object getItem(int position) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		final ViewHolder viewHolder;
		if (convertView == null) {
			convertView = inflater.inflate(R.layout.x_activityfragment1_list_view_item,
					null);
			viewHolder = new ViewHolder();
			viewHolder.title = (TextView) convertView
					.findViewById(R.id.activity_title);
			viewHolder.image = (ImageView) convertView
					.findViewById(R.id.activity_image);
			viewHolder.address = (TextView) convertView
					.findViewById(R.id.activity_address);
			viewHolder.startLine = (TextView) convertView
					.findViewById(R.id.activity_startLine);
			viewHolder.endLine = (TextView) convertView
					.findViewById(R.id.activity_endLine);
			viewHolder.peoples = (TextView) convertView
					.findViewById(R.id.activity_peoples);
			
			convertView.setTag(viewHolder);
		} else {
			viewHolder = (ViewHolder) convertView.getTag();
		}
		// viewHolder.hint.setText(str2[position]);
		// viewHolder.userData.setText(str[position]);

		return convertView;

	}


}
